<div class="bpm-foot">
  <div class="tools">
    <div class="item" *ngIf="bs.info.auth.opt_bc" (click)="save()">
      <i nz-icon type="save" class="icon"></i>
      <span class="text">保存</span>
    </div>
    <div class="item" *ngIf="bs.info.auth.opt_tj" (click)="getSignTask()">
      <i nz-icon type="safety" class="icon"></i>
      <span class="text">提交</span>
    </div>
    <div class="item" *ngIf="bs.info.auth.opt_th" (click)="getBackTask()">
      <i nz-icon type="rollback" class="icon"></i>
      <span class="text">退回</span>
    </div>
    <div class="item" *ngIf="bs.info.auth.opt_ch" (click)="revokeTask()">
      <i nz-icon type="enter" class="icon"></i>
      <span class="text">撤回</span>
    </div>
    <div class="item" *ngIf="bs.info.auth.opt_cx" (click)="disposal()">
      <i nz-icon type="close-circle" class="icon"></i>
      <span class="text">退件</span>
    </div>
    <div class="item" *ngIf="bs.info.auth.opt_jh" (click)="easter()">
      <i nz-icon type="cloud" class="icon"></i>
      <span class="text">激活</span>
    </div>
    <div class="item" *ngIf="bs.info.auth.opt_gq">
      <i nz-icon type="stop" class="icon"></i>
      <span class="text">挂起</span>
    </div>
    <div class="item" *ngIf="bs.info.auth.opt_jg">
      <i nz-icon type="unlock" class="icon"></i>
      <span class="text">解挂</span>
    </div>
    <div class="item" *ngIf="bs.info.auth.opt_tz">
      <i nz-icon type="swap" class="icon"></i>
      <span class="text">跳转</span>
    </div>
    <div class="item" (click)="close()">
      <i nz-icon type="logout" class="icon"></i>
      <span class="text">关闭</span>
    </div>
  </div>
</div>
<nz-modal nzWidth='700' nzTitle="操作" [nzMaskClosable]='false' [nzFooter]="null" [(nzVisible)]="bs.isEditVisible"
  (nzOnCancel)="bs.isEditVisible=false">
  <form nz-form [nzLayout]="'inline'">
    <div nz-row [nzGutter]="24">
      <nz-table *ngIf="bs.info.type!=='3'" nzSize="middle" [nzShowPagination]="false" [nzData]="bs.result.tasks">
        <thead>
          <tr>
            <th nzWidth="220px">环节</th>
            <th nzWidth="400px">审批人</th>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let data of bs.result.tasks">
            <td>
              <label nz-radio [(ngModel)]="data.select" (click)="bs.taskSelected(bs.result.tasks, data)"
                [ngModelOptions]="{standalone: true}">{{data.name}}</label>
            </td>
            <td>
              <label nz-checkbox *ngFor="let u of data.users" [(ngModel)]="u.userSelected"
                [ngModelOptions]="{standalone: true}">{{u.userName}}</label>
            </td>
          </tr>
        </tbody>
      </nz-table>

      <nz-table *ngIf="bs.info.type==='3'" nzSize="middle" [nzShowPagination]="false" [nzData]="[{}]">
        <thead>
          <tr>
            <th nzWidth="220px">环节</th>
            <th nzWidth="400px">审批人</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>
              <nz-radio-group [(ngModel)]="bs.freeTask" [ngModelOptions]="{standalone: true}">
                <label nz-radio nzValue="task2">审批</label>
                <label nz-radio nzValue="U9" *ngIf="bs.option==='sign'">办结</label>
              </nz-radio-group>
            </td>
            <td>
              <app-userselect *ngIf="bs.freeTask!=='U9'" [(userNames)]='userNames' [(userIDs)]='userIDs'>
              </app-userselect>
            </td>
          </tr>
        </tbody>
      </nz-table>
    </div>
    <div nz-row [nzGutter]="24">
      <div nz-col [nzSpan]="24" class="form-button-align">
        <button nz-button nzType="default" (click)="bs.isEditVisible=false" class="form-button">取消</button>
        <button nz-button nzType="primary" (click)="send()" [nzLoading]="bs.isLoading">确认</button>
      </div>
    </div>
  </form>
</nz-modal>